﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Model;
using Controller;

namespace Facade.Validator
{
    public class SubSectionValidator
    {
        public string ValidateOnSave(SubSection SubSections)
        {
            string msg = "OK";
            if (SubSections.Description.Trim().Length <= 0)
                msg = "Please Enter SubSection Description";
            if (SubSections.Section == null)
                msg = "Please Enter Section";
            return msg;
        }

        public string ValidateOnUpdate(SubSection SubSections)
        {
            string msg = "OK";
            if (SubSections.Description.Trim().Length <= 0)
                msg = "Please Enter SubSection Description";
            if (SubSections.Section == null)
                msg = "Please Enter Section";
            return msg;
        }
    }
}